<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:66:"/var/www/html/CRM/public/../application/admin/view/index/main.html";i:1541121175;}*/ ?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>铭代码CRM</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
</head>
<style>
	.mask{
		width: 100%;
		height: 100%;
		background-color: #fff;
		opacity: 1;
		position: absolute;
		top: 0;
		left: 0;
	}
	.main{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
	.main>h1{
		width: 80%;
		font-size:24px;
		font-weight: normal;
		text-align: center;
		margin-top: 10px;
		color: #333;
	}
	.main>.content{
		width: 80%;
		margin: 20px auto;
		color: #000;
	}
	.main>.content .row{
		width: 100%;
		margin: 20px 0;
	}
	.main>.content .row>span:nth-of-type(1){
		width: 115px;
		text-align: right;
		display: inline-block;
	}
</style>
<body>
	<div id="pageAll">
		<div class="page">
			<!-- main页面样式 -->
			<div class="indexL">
				<!--背景-->
				<!--<img class="indexBn" width="106%" height="650" src="/admin/img/indexBanner.jpg" />-->
				<!--蒙版-->
				<div class="mask"></div>
				<!--主内容-->
				<div class="main">
					<h1>欢迎使用铭代码CRM系统</h1>
					<div class="content">
						<div class="cfD">
							筛选开始时间：<input autocomplete="off" class="vinput laydate-icon" type="text" id="start"/>&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							筛选截止时间：<input autocomplete="off" class="vinput laydate-icon" type="text" id="end"/>
						</div>
						<div id="num">
							<div class="row">
								<span>当月上门量：</span><span><?php echo $res['sm']['num']; ?></span>
							</div>
							<div class="row">
								<span>当月接待人数：</span><span><?php echo $res['jd']['num']; ?></span>
							</div>
							<div class="row">
								<span>当月试岗人数：</span><span><?php echo $res['sg']['num']; ?></span>
							</div>
							<div class="row">
								<span>当月签单人数：</span><span><?php echo $res['qd']['num']; ?></span>
							</div>
							<div class="row">
								<span>当月就业人数：</span><span><?php echo $res['jy']['num']; ?></span>
							</div>
							<div class="row">
								<span>当月求职中人数：</span><span><?php echo $res['qz']['num']; ?></span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- main页面样式end -->
		</div>
	</div>
	<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
	<script type="text/javascript" src="/admin/js/laydate.js"></script>
	<script type="text/javascript">
        !function(){
            laydate.skin('molv');//切换皮肤，请查看skins下面皮肤库
            laydate({elem: '#demo'});//绑定元素
        }();

        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
            min: '1990-01-01', //设定最小日期为当前日期
            max: '2099-06-16', //最大日期
            istime: true,
            istoday: false,
            choose: function(datas){
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };

        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
            min: laydate.now(),
            max: '2099-06-16',
            istime: true,
            istoday: false,
            choose: function(datas){
                start.max = datas; //结束日选好后，充值开始日的最大日期
                time_search();
            }
        };
        laydate(start);
        laydate(end);

        //自定义日期格式
        laydate({
            elem: '#test1',
            format: 'YYYY年MM月DD日',
            festival: true, //显示节日
            choose: function(datas){ //选择日期完毕的回调
                alert('得到：'+datas);
            }
        });

        //日期范围限定在昨天到明天
        laydate({
            elem: '#hello3',
            min: laydate.now(-1), //-1代表昨天，-2代表前天，以此类推
            max: laydate.now(+1) //+1代表明天，+2代表后天，以此类推
        });
        //	时间筛选
        function time_search() {
            var start = $('#start').val();
            var end = $('#end').val();
            if(start!='' && end!=''){
                $.post('<?php echo url("admin/index/search"); ?>',{'start':start,'end':end},function (res) {
                    console.log(res);
                    var str = '';
					str +='<div class="row"><span>当月上门量：</span><span>'+res['sm']['num']+'</span></div>';
					str +='<div class="row"><span>当月接待人数：</span><span>'+res['jd']['num']+'</span></div>';
					str +='<div class="row"><span>当月试岗人数：</span><span>'+res['sg']['num']+'</span></div>';
					str +='<div class="row"><span>当月签单人数：</span><span>'+res['qd']['num']+'</span></div>';
					str +='<div class="row"><span>当月就业人数：</span><span>'+res['jy']['num']+'</span></div>';
					str +='<div class="row"><span>当月求职中人数：</span><span>'+res['qz']['num']+'</span></div>';
					$('#num').html(str);
                },'json');
            }
        }
</script>
</body>
</html>